import requset from "../utils/request"

/**
 * @description: 获取部门
 * @return {*}
 */
export const getDeptAPI = (data: any) => {
    return requset('depend/getInventoryDept', 'GET', data)
}

/**
 * @description: 根据部门id获取所属领域
 * @return {*}
 */
export const getInventoryFieldByDeptIdAPI = (data: any) => {
    return requset(`depend/getInventoryFieldByDeptId/${data.id}`, 'GET', data)
}

/**
 * @description: 获取事项类型
 * @return {*}
 */
export const getInventoryTypeAPI = (data: any) => {
    return requset(`depend/getInventoryType`, 'GET', data)
}

/**
 * @description: 获取责任
 * @return {*}
 */
export const getInventoryDutyAPI = (data: any) => {
    return requset(`depend/getInventoryDuty`, 'GET', data)
}

/**
 * @description: 新增清单公示
 * @return {*}
 */
export const addInventoryAPI = (data: any) => {
    return requset(`depend/addInventory`, 'POST', data)
}

/**
 * @description: 根据条件分页查询清单公示
 * @return {*}
 */
export const getInventorysAPI = (data: any) => {
    return requset(`depend/getInventorysPageByParams`, 'GET', data)
}

/**
 * @description: 根据id获取清单公示
 * @return {*}
 */
export const getInventoryByIdAPI = (data: any) => {
    return requset(`depend/getInventoryById/${data.id}`, 'GET', data)
}

/**
 * @description: 更新清单公示
 * @return {*}
 */
export const updateInventoryAPI = (data: any) => {
    return requset(`depend/updateInventory`, 'POST', data)
}

/**
 * @description: 根据id删除清单公示
 * @return {*}
 */
export const deleteInventoryAPI = (data: any) => {
    return requset(`depend/deleteInventory/${data.id}`, 'GET', data)
}